﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace PowerPivotUpdaterUI
{
    public class SiteSelector : StringConverter
    {
        public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
        {
            return true;
        }
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            GeneralViewNode v = (GeneralViewNode)context.Instance;
            List<string> lst = new List<string>();

            if ( v.ExcelFile == "")
                return new StandardValuesCollection(new string[] { "Excel URL not COnfigured" });

            string[] conns = PowerPivotUpdater.ExcelServiceManager.GetSiteURL (v.ExcelFile);
         
            return new StandardValuesCollection(conns );
        }

    }
}
